<link rel="stylesheet" type="text/css" href="<?php echo PUBLIC_URL ?>css/content.css"><!-- 首页内容区域大盒子-->
<link rel="stylesheet" type="text/css" href="<?php echo PUBLIC_URL ?>css/with.css">
<style>
#background{height:2800px;}
#ba{height:2800px; background:#FFFFFF;}
#footer{margin-top:-10px;}
</style>
<script src="<?php echo PUBLIC_URL ?>js/jquery-1.8.3.js" type="text/javascript" charset="utf-8"></script>
<div class="n" style="height:35px;"></div><!--放个div，才能让龙播图在ff中动作-->
<div id="content">
            <ul style="position:relative;overflow:hidden;height:450px;z-index:1000;">
                <li name="li" style="list-style:none;position:absolute;width:100%;"><img height=500 name="bb" width="100%" src="<?php echo PUBLIC_URL ?>images/ao/banner.jpg" /></li>
                <li name="li" style="list-style:none;position:absolute;width:100%;"><img height=500 width="100%" src="<?php echo PUBLIC_URL ?>images/ao/banner1.jpg" /></li>
                <li name="li" style="list-style:none;position:absolute;width:100%;"><img height=500 width="100%" src="<?php echo PUBLIC_URL ?>images/ao/banner2.jpg" /></li>
                <li name="li" style="list-style:none;position:absolute;width:100%;"><img height=500 width="100%" src="<?php echo PUBLIC_URL ?>images/ao/banner3.jpg" /></li>
                <li name="li" style="list-style:none;position:absolute;width:100%;"><img height=500 width="100%" src="<?php echo PUBLIC_URL ?>images/ao/banner4.jpg" /></li>
                <li name="li" style="list-style:none;position:absolute;width:100%;"><img height=500 width="100%" src="<?php echo PUBLIC_URL ?>images/ao/banner5.jpg" /></li>
            
            </ul>
     <script type="text/javascript" charset="utf-8">
        var width = $('img[name=bb]' ).get(0).offsetWidth
        $('li[name=li]').each(function(i) {
            $(this).css('left', i * width); 
        });
       
        var open = setInterval(function(){
            
            $('li[name=li]').each(function(i) {
                
                var pos = $(this).position().left;
                             
                if (pos < 0) {
                    
                    $(this).css('left', ($('li[name=li]').length-1) * width);
                } 

                 $(this).animate({'left' : '-='+width+'px'},1000);

            });
        }, 3000);
        
        $('li[name=li]').bind({
            mouseover:function(){ clearInterval(open);},
            mouseout:function(){
                          open = setInterval(function(){
            
            $('li[name=li]').each(function(i) {
                
                var pos = $(this).position().left;
                             
                if (pos < 0) {
                    
                    $(this).css('left', ($('li[name=li]').length-1) * width);
                } 

                 $(this).animate({'left' : '-='+width+'px'},1000);

            });
        }, 3000);
            }
        });
	
    </script>
      <div id="content-nav">
        <img height="42" src="<?php echo PUBLIC_URL ?>images/ao/longtu.bmp" />
        <font>新闻 NEWS</font>
            <li style="cursor:pointer;float:left; margin-left:25px;margin-right:25px;margin-top:12px;font-size:12px;list-style:disc">癌症高发群：你被盯上了么...</li>
            <li style="float:left;cursor:pointer; margin-left:25px;margin-right:25px;margin-top:12px;font-size:12px;list-style:disc">糖尿病患者更需要调脂...</li>
            <li style="float:left;cursor:pointer; margin-left:25px;margin-right:25px;margin-top:12px;font-size:12px;list-style:disc">癌症早发现癌症高发...</li>
            <li style="float:left;cursor:pointer; margin-left:25px;margin-right:25px;margin-top:12px;font-size:12px;list-style:disc">癌症早发现癌症高发...</li>
    </div>
 
	<div id="content-one"><!-- nav条开始-->
		<ul style="color:#FFFFFF">
			<li name="classif" id="1" style="cursor:pointer">健康</li>
			<li name="classif" id="2" style="cursor:pointer">癌症</li>
			<li name="classif" id="3" style="cursor:pointer;">糖尿病</li>
		</ul>
	</div><!-- nav条end-->
<div id="content-tow" style="background:#FFFFFF; height:1300px;"><!-- 包括左右两个盒子start-->
		<!-- 便利区左盒子 -->
    <div style="position:relative; height:900px;">
        <div id="append">
                        <?php
                        if(!$article['status']){
                                echo "";
                        }else{
                                foreach($article['article_list'] as $val){
                        
                        ?><!-- 最少要五次-->
                        <div  class="left" name="morearticle" ><div class="classdir"   style="display:none;"><?php echo $val['classdir']; ?></div><div id="<?php echo $val['ID']; ?>" onclick="classdirr(this)" class="left-left" style="cursor:pointer;width:250px; height:200px;overflow:hidden;background:#FFFFFF;"><?php echo $val['img']; ?></div>
                            <div class="left-right" style="margin-top:2px;left:280px;clear:both;background:transparent; width:44%;">
                                <h3 style="margin-left:10px;text-align:left;padding:0px;width:400px;margin-top:10px;"><?php echo $val['articleTit'] ?></h3>
                                <div style="margin-left:7px;text-align:left;display:block;width:85%;padding-left:0px;height:80px;line-height:20px;padding:6px;font-size:12px;color:#ADB0AE;">
                                
                                    <?php echo $val['articleContent']; ?>
                                </div>
                                
                                <ul style="margin-left:-22px; margin-top:30px;position:relative;">
                                    <li><img src="<?php echo PUBLIC_URL ?>images/ao/name.bmp">&nbsp;&nbsp;<?php echo $val['author']; ?>&nbsp;&nbsp;</li>
                                    <li><img src="<?php echo PUBLIC_URL ?>images/ao/time.bmp">&nbsp;&nbsp;<font style="color:gray;"><?php echo $val['pubDate'] ?></font>&nbsp;&nbsp;</li>
                                    <li><img src="<?php echo PUBLIC_URL ?>images/ao/jian.bmp"><font color="gray">&nbsp;&nbsp;More</font></li>
                                    <li style="cursor:pointer;width:100px;float:right;position:relative;right:36px;top:20px;" onclick="feng()"><img style="position:relative;left:60px;"  style=""class="pub" src="<?php echo PUBLIC_URL ?>images/ao/pubxiang.bmp">&nbsp;&nbsp;</li>
                                </ul>
                            </div>
                        </div>
                        <?php
                            } 
                        }
                        ?>
                        <!-- 便利区end -->
                        <!--分页start -->
        </div>
        <div class="left" id="page" style="position:relative;color:#ADB0AE;height:105px;padding-top:40px;">
			<?php echo $article['page']; ?>
        </div>
        <!--分页end -->
                <!--测边栏(1)start -->
                <?php  include_once(VIEWS_URL.'welcome/aside_one.php');  ?>
                <!--测边栏end -->     
	</div>
</div>
    <!-- 包括左右两个盒子end-->
</div>
<!-- 首页内容区域大盒子-->
<!-- 底部关于他们start-->
     <?php  include_once(VIEWS_URL.'welcome/with.php');  ?>
<!-- 底部关于他们end-->
<script>
    $(function(){
			$('li[name=classif]').bind('click', function(){
                var ys = $(this).css('background-color');
                $('li[name=classif]').css({'background-image':'url(<?php echo null;?>)' });
                $('li[name=classif]').css('background', '#AAC619');
                $(this).css('background', '#FFFFFF');
                $(this).css({'background-image':'url(<?php echo PUBLIC_URL ?>images/ao/btn-hover.gif)' });
   
				var  thisid=$(this).attr('id');
                $.ajax({
                    url:'<?php echo DOCUMENT."article/showarticle" ?>',
                    data:'thisid='+thisid,
                    type:'get',
                    success:function(data){
                   
                    if(data['status'] == 1){
                        var app=$('#append');
                        var page=$('#page');
                        app.empty();
                        page.empty();
                            $.each(data['article_list'], function(k, v){
                                                    var appen = $('<div  class="left" name="morearticle"  ><div class="classdir" style="display:none;">'+v['classdir']+'</div><div  id="'+v['ID']+'" onclick="classdirr(this)" style="cursor:pointer; width:250px; height:200px; overflow:hidden;background:#FFFFFF" class="left-left">'+v['img']+'</div><div class="left-right" style="margin-top:2px;left:280px;clear:both;background:transparent;"><h3 style="margin-left:10px;text-align:left;padding:0px;width:400px;">'+v['articleTit']+'</h3><div style="margin-left:7px;text-align:left;display:block;width:85%;padding-left:0px;height:80px;line-height:20px;padding:6px;font-size:12px;color:#ADB0AE;">'+v['articleContent']+'</div><ul style="margin-left:-20px;"><li><img src="<?php echo PUBLIC_URL ?>images/ao/name.bmp">&nbsp;&nbsp;'+v['author']+'&nbsp;&nbsp;</li><li><img src="<?php echo PUBLIC_URL ?>images/ao/time.bmp">&nbsp;&nbsp;'+v['pubDate']+'&nbsp;&nbsp;</li><li><img src="<?php echo PUBLIC_URL ?>images/ao/jian.bmp">&nbsp;&nbsp;More</li><li style="cursor:pointer;width:100px;float:right;position:relative;right:-13px;top:20px;" onclick="feng()"><img  class="pub" src="<?php echo PUBLIC_URL ?>images/ao/pubxiang.bmp">&nbsp;&nbsp;</li></ul></div></div>');
                                                     var app=$('#append');
                                                     app.append(appen);
                                 
                                               });
                                            var pa = data['page'];
                                            
                                            page.append(pa);
                    }else{
                        alert('暂无数据！！');
                    }
                        
                    },
                    error:function(){
                        alert('无数据！！');
                    },
                    
                    dataType:'json'
                    
                });
			
			});
	  })

    $('li[name=classif]').bind({
       /* mouseover:function(){
        var ys = $(this).css('background-color');
        $(this).css('background', '#FFFFFF');
        $(this).css({'background-image':'url(<?php echo PUBLIC_URL ?>images/ao/btn-hover.gif)' });
        },
        /*
        mouseout:function(){
            $(this).css({'background-image':'url(<?php echo null;?>)' });
            $(this).css('background', '#AAC619');
        },
        */

    });//with_center
    function classdirr(obj){//跳转
        //var classdir = obj.firstChild.innerHTML;
        var classdir = obj.previousSibling.innerHTML;
        var ID = obj.id;
        window.location.href="<?php echo DOCUMENT.'article/show_article_content?articleInfo=&classdir=' ?>"+classdir+"&ID="+ID;
        if(classdir == '' || classdir == 'undefined'){
            alert('qqq');
        }
     }
     
      $('font[name=ajaxpage]').live('click', function(){
                    $(this).css('color', 'pink');//此为原条件
                    var originID = $(this).parent().find('input[name=ajaxpage]').val();
                    var pageID = $(this).attr('id');

                    $.ajax({
                        url:'<?php echo DOCUMENT."article/showarticle"; ?>',
                        data:'ppage='+pageID+'&thisid='+originID,
                        type:'get',
                        success:function(data){
                            if(data['status'] == 1){
                            
                            var app=$('#append');
                            var page=$('#page');
                            app.empty();
                            page.empty();
                            $.each(data['article_list'], function(k, v){
                                                    var appen = $('<div  class="left" name="morearticle" ><div class="classdir" style="display:none;">'+v['classdir']+'</div><div onclick="classdirr(this)" id="'+v['ID']+'"  style="width:250px; height:200px; overflow:hidden;background:#FFFFFF; cursor:pointer;" class="left-left">'+v['img']+'</div><div class=left-right style="margin-top:2px;left:280px;clear:both;background:transparent;"><h3 style="margin-left:10px;text-align:left;padding:0px;width:400px;">'+v['articleTit']+'</h3><div style="margin-left:7px;text-align:left;display:block;width:85%;padding-left:0px;height:80px;line-height:20px;padding:6px;font-size:12px;color:#ADB0AE;">'+v['articleContent']+'</div><ul style="margin-left:-20px;"><li><img src="<?php echo PUBLIC_URL ?>images/ao/name.bmp">&nbsp;&nbsp;'+v['author']+'&nbsp;&nbsp;</li><li><img src="<?php echo PUBLIC_URL ?>images/ao/time.bmp">&nbsp;&nbsp;'+v['pubDate']+'&nbsp;&nbsp;</li><li><img src="<?php echo PUBLIC_URL ?>images/ao/jian.bmp">&nbsp;&nbsp;More</li><li style="cursor:pointer;width:100px;float:right;position:relative;right:-10px;top:20px;" onclick="feng()"><img  class="pub" src="<?php echo PUBLIC_URL ?>images/ao/pubxiang.bmp">&nbsp;&nbsp;</li></ul></div></div>');
                                                     var app=$('#append');
                                                    app.append(appen);
                                 
                                               });
                                                var pa = data['page'];
                                                page.append(pa);
                            }else{
                                alert('暂无数据！！');
                            }
                        },
                        error:function(){
                            alert('失败');
                        },
                        dataType:'json'
                    });
               });
          function feng(){
            alert('分享吧');
            window.location.href="www.baidu.com";
          }     
           
   	  
</script>

    